package com.example.walletdemo.service;

import com.example.walletdemo.entity.Bank;
import com.example.walletdemo.entity.Order;
import com.example.walletdemo.entity.Record;
import com.example.walletdemo.entity.Wallet;

import java.util.List;

public interface WalletService {

    Wallet selectWalletByUserName(String username);

    boolean insertOrder(Order order,Wallet wallet);

    Wallet selectWalletById(int wid);


    int updateWallet(Wallet wallet);

    void insertRecord(Record record);

    Order selectOrdersByOid(int oid);

    boolean refund(Order orders);

    List<Record> selectRecordByWid(int wid);

    Bank selectBankByCardNo(String cardNo);

    Wallet selectWalletBycardNo(String cardNo);

    boolean reflect(Wallet wallet, String cardNo, double money);

    boolean recharge(Bank bank, double money);
}
